package com.kelaite.procurement.repository;

import java.util.Date;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.kelaite.procurement.entity.TSalesOrderExecution;

public interface SalesOrderExecutionRepository extends JpaRepository<TSalesOrderExecution, Long>{
	
	@Modifying
	@Query(value = "update t_sales_order_execution o set o.confirmTime =:confirmTime, o.gmtUpdateTime =:gmtUpdateTime, o.updatedBy =:updatedBy where o.id =:id")
	public int updateSalesOrderExecution(@Param("id") Long id,
			@Param("confirmTime") Date confirmTime,
			@Param("gmtUpdateTime") Date gmtUpdateTime,
			@Param("updatedBy") String updatedBy);
}
